4.3 – Non-Ideal Gas Laws¶
4.3.0 – Learning Objectives¶
By the end of this section you should be able to:
- Understand why most gases don’t behave ideally.
- Use equations of the state for non-ideal gases.
- Find and use the compressibility factor.
4.3.1 – Introduction¶
Before this course, you most likely have used the ideal gas law, \(P V = n R T\), but this equation of state is not very accurate in describing gases in the real world. This is because the ideal gas law assumes that gas particles are infinitesimal points of mass and that these points of mass do not interact with each other. This is a flaw in the ideal gas law and causes the ideal gas law to be close to the truth only when pressures are relatively low or the gases are noble gases, especially Helium.
That is why equations of state for non-ideal gases are crucial for calculating how real gases. In this section, we will focus on the compressibility factors to correct the ideal gas law and the viral equation, the Van der Walls equation, and the Soave-Redlich-Kwong equation.
4.3.2 – Equations of the State for Non-Ideal Gases¶
Critical temperature, \(T_c\), and critical pressure, \(P_c\), are the temperature and pressure of a species at its critical point. These two properties often tell us how well or poorly the ideal gas law is for describing the species.
The Viral Equation of State¶
The viral equation of state is an expression of the quantity \(P \hat{V} / R T\) as a power series in the inverse of specific volume:
Where B, C, and D are the second, third, and fourth virial coefficients respectively. These coefficients are functions of temperature. As of right now, estimating the coefficients beyond B is very difficult so we use a truncated version:
To solve the viral equation of state we must:
Look up the critical temperature, \(T_c\), the critical pressure, \(P_c\), and the Pitzer acentric factor, \(\omega\). Pitzer acentric factor is a constant that reflects the geometry and polarity of a molecule.
Calculate the reduced temperature, \(T_r = T / T_c\).
Estimate B using:
\[B_0 = 0.083 - \frac{0.422}{T^{1.6}_r}\]\[B_1 = 0.139 - \frac{0.172}{T^{4.2}_r}\]\[B = \frac{R T_c}{P_c} (B_0 + \omega B_1)\]Substitute B back into the viral equation of state.
Van der Waals Equation of State¶
The Van der Waals equation of state is the first cubic equations of state. Cubic equations of state are equations that when expanded are third-order equations for specific volume. The equation is:
where
The \(\frac{a}{\hat{V}^2}\) term accounts for the attractive and repulsion forces between molecules. \(b\) is the correction for the volume occupied by the molecules themselves
Soave–Redlich–Kwong Equation of State¶
The Soave–Redlich–Kwong (SRK) equation of state is more complex yet is remarkably robust in describing a variety of systems. The equation is:
where
4.3.3 – Compressibility Factor¶
The compressibility factor of a gas is defined as:
When \(z = 1\), the gas behaves ideally. The amount \(z\) differs from 1 is a measurement of how non-ideal the gas is.
A method used to estimate \(z\), since every type of gas has different \(z\) factors at the same pressure and temperature, is:
- Look up the critical temperature, \(T_c\), and critical pressure, \(P_c\), of the species.
- Calculate the reduced temperature, \(T_r = \frac{T}{T_c}\) and reduced pressure, \(P_r = \frac{P}{P_c}\).
- Look up the values of \(z\) on a generalized compressibility chart, which plots \(z\) versus \(P_r\).
This method of estimating \(z\) is the empirical law of corresponding states. The reduced temperature and pressure provide a measure of the gas’s proximity to its critical state. The closer \(T_r\) and \(P_r\) are to 1, the closer the gas is to its critical state. This suggests that a plot of \(z\) verses \(T_r\) and \(P_r\) will be approximately the same for all substances. This type of plot is called a **generalized compressibility chart**.
Each line represents a different \(T_r\) while \(P_r\) is the x-axis. The y value of intersection between the \(T_r\) and \(P_r\) is the compressibility factor.
4.3.4 – Problem Statement¶
Question¶
The pressure gauge on a \(20.0 \space m^3\) tank of nitrogen at \(25 ^{\circ} C\) reads \(10 \space \text{bar}\). The critical temperature, \(T_c\), of nitrogen is \(-146.9 ^{\circ} C\). The critical pressure, \(P_c\), of nitrogen is \(33.5 \space \text{atm}\). The Pitzer acentric factor, \(\omega\), is \(0.039\). What is the mass, in \(kg\), of nitrogen in the tank using the:
- Ideal gas law?
- Truncated viral equation of state?
Is it reasonable to use an equation of state other than the ideal gas law in this case? Why/why not?
Answer¶
a) Ideal gas law¶
Since we know that the ideal gas law is \(P V = n R T\), we can solve for n. First, everything needs to be converted into SI units.
next we can solve for n
now we must convert moles of nitrogen into mass.
b) Viral equation of state¶
Since we know the viral equation of state is
where
we can solve for \(n\). First let’s solve for \(B_0\). We know that
next let’s solve for \(B_1\)
after this we can solve for \(B\)
Finally, we can solve for \(n\)
Since we have a quadratic, we get 2 answers. Since 8,087 moles is much more reasonable than 3,488,416, we will assume that is the correct answer. Finally, we can solve for the mass
No, it is not reasonable to use an equation of state other than the ideal gas law. This is because the $ N_2 $ is a relatively inert gas. It also is relatively small in both mass and volume. This makes the ideal gas assumption close to the truth. You can see the proof in our calculated masses. After significant figures, the masses are almost the same.
Answer Using Python¶
One of the best things about python is the nearly limitless libraries avaible to use. To solve this problem we are going to use the Thermo library made by Caleb Bell. By clicking on his name, you can find his github page and discover other great projects he is working to make python more useful for chemical engineers.
We must first download the thermo library.
In [1]:
!pip install thermo --user
Requirement already satisfied: thermo in c:\users\said zaid-alkailani\appdata\roaming\python\python36\site-packages
Requirement already satisfied: scipy in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from thermo)
Requirement already satisfied: coolprop in c:\users\said zaid-alkailani\appdata\roaming\python\python36\site-packages (from thermo)
Requirement already satisfied: pandas in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from thermo)
Requirement already satisfied: fluids in c:\users\said zaid-alkailani\appdata\roaming\python\python36\site-packages (from thermo)
Requirement already satisfied: python-dateutil>=2 in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from pandas->thermo)
Requirement already satisfied: pytz>=2011k in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from pandas->thermo)
Requirement already satisfied: numpy>=1.7.0 in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from pandas->thermo)
Requirement already satisfied: six>=1.5 in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from python-dateutil>=2->pandas->thermo)
Now we need to import the data
In [2]:
from thermo.chemical import Chemical
Now lets apply the data from this library
In [3]:
V = 20
rho = Chemical('nitrogen', T=298.15, P=1E6).rho
mass_N2 = V*rho
print("The mass of Nitrogen in the tank is ", mass_N2,"kg")
The mass of Nitrogen in the tank is 226.4052055389342 kg
As you can see, the mass of the nitrogen in the tank is \(226.4 \space kg\) which is very similar to the value we got from the viral equation of state.
Citation¶
Caleb Bell (2016). thermo: Chemical properties component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/thermo.
In [ ]: